export const roleList_enterprise = [
  // {label:"查看",value:"check"},//默认勾选
  // {label:"新建",value:"add"},//文件上传，文件夹新建
  // {label:"编辑",value:"update"},//文件编辑，文件夹重命名
  // {label:"删除",value:"delete"},//文件作废，文件夹作废
  // {label:"下载",value:"download"},//文件夹下载，文件下载
  // {label:"复制",value:"copy"},//文件夹，文件
  // {label:"移动",value:"move"},//文件夹，文件
  // {label:"分享链接",value:"share"},
  // {label:"权限控制",value:"jurisdiction"},
  // {label:"添加企业标签",value:"label"},
  // { label: "查看", value: "query" },//默认勾选
  // { label: "编辑", value: "editor" },
  // { label: "管理员", value: "manager" },
  { name: "管理员", disabled: false, describe: "可以新建文件夹，权限管理等所有权限", value: "manage" },
  { name: "可上传", disabled: false, describe: "可以上传文件和文件夹，包括可编辑权限", value: "upload" },
  { name: "可编辑", disabled: false, describe: "修订、作废、重命名文件夹和文件，包括可下载权限", value: "editor" },
  { name: "可下载", disabled: false, describe: "可以下载文件和文件夹，包括可查看权限", value: "download" },
  { name: "可查看", disabled: false, describe: "可以打印文件，包括仅查看权限", value: "print" },
  // { name: "可查看", disabled: false, describe: "仅查看权限", value: "print" },
  { name: "仅查看", disabled: false, describe: "仅可查看文件和文件夹", value: "query" }
];
export const roleList_team = [
  { label: "查看", value: "check" }, //默认勾选
  { label: "新建", value: "add" }, //文件上传，文件夹新建
  //  { label: "新建文件夹", value: "addFolder" },//文件上传，文件夹新建
  { label: "编辑", value: "update" }, //文件编辑，文件夹重命名
  { label: "删除", value: "delete" }, //文件作废，文件夹作废
  { label: "下载", value: "download" }, //文件夹下载，文件下载
  { label: "复制", value: "copy" }, //文件夹，文件
  { label: "移动", value: "move" }, //文件夹，文件
  { label: "分享链接", value: "share" },
  { label: "权限控制", value: "jurisdiction" },
  { label: "分发", value: "distribute" },
  { label: "回收站", value: "recycle" },
  { label: "团队标签", value: "label" },
  { label: "控制模板", value: "template" },
  { label: "打印", value: "print" },
  { label: "提交企业库", value: "commitEnterprise" }
];
// 个人协同编辑_用户权限
export const roleList_person_invitation = [
  // owner 代表所有者   这里没有是因为不让选择
  { value: "synergy_admin", label: "管理员" },
  { value: "edit", label: "可编辑" },
  { value: "read", label: "可阅读" }
];
// 个人协同编辑_链接分享范围
export const roleList_person_invitation_range = [
  { value: "sys_synergy_user", label: "仅文档协作者可通过链接访问" },
  { value: "sys_read_user", label: "组织内获得链接的人可阅读" },
  { value: "sys_edit_user", label: "组织内获得链接的人可编辑" }
];
//判断企业权限
// enterpriseLabel:企业标签,watermark:文件水印,toArchives:归档入库,syncAi:同步到AI模型
export function judgeEnterpriseRoleFunc(params) {
  let roleList = [];
  if (params == "manage") {
    //管理员
    roleList = [
      "check",
      "download",
      "add",
      "delete",
      "update",
      "share",
      "jurisdiction",
      "enterpriseLabel",
      "watermark",
      "toArchives",
      "syncAi",
      "print"
    ];
  } else if (params == "upload") {
    //可上传
    roleList = ["check", "addFolder", "download", "delete", "update", "enterpriseLabel", "print"];
  } else if (params == "editor") {
    //可编辑
    roleList = ["check", "download", "delete", "update", "enterpriseLabel", "print"];
  } else if (params == "download") {
    //可下载
    roleList = ["check", "download", "enterpriseLabel", "print"];
  } else if (params == "print") {
    //可查看
    roleList = ["check", "print"];
  } else if (params == "query") {
    //仅查看
    roleList = ["check"];
  } else {
    roleList = ["check"];
  }
  return roleList;
}

export default {
  roleList_enterprise,
  roleList_team,
  roleList_person_invitation,
  judgeEnterpriseRoleFunc,
  roleList_person_invitation_range
};
